﻿Imports System.Data.SqlClient
Imports System.IO
Public Class Frm_Main

    Private Sub Btn_Gestion_Clients_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btn_Gestion_Clients.Click
        StandardInitial()
        Frm_Gestion_Clients.MdiParent = Me
        Frm_Gestion_Clients.Show()

    End Sub

    Private Sub Btn_Paiement_Clients_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btn_Paiement_Clients.Click
        StandardInitial()
        Frm_Demande_Clients_loc.MdiParent = Me
        Frm_Demande_Clients_loc.Show()

    End Sub

    Private Sub btn_Demande_Clients_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_Demande_Clients.Click
        StandardInitial()
        Frm_Demande_Clients.MdiParent = Me
        Frm_Demande_Clients.Show()

    End Sub

    Private Sub Btn_Gestion_Fourniss_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btn_Gestion_Fourniss.Click
        StandardInitial()
        Frm_Gestion_Fourn.MdiParent = Me
        Frm_Gestion_Fourn.Show()
    End Sub

    Private Sub btn_Gestion_Personnels_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_Gestion_Personnels.Click
        StandardInitial()
        Frm_Gestion_Personnels.MdiParent = Me
        Frm_Gestion_Personnels.Show()
    End Sub


    Private Sub btn_Gestion_Equipements_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_Gestion_Equipements.Click
        StandardInitial()
        Frm_Gestion_Equipements.MdiParent = Me
        Frm_Gestion_Equipements.Show()
    End Sub

    Private Sub btn_Demande_Fournisseurs_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_Demande_Fournisseurs.Click
        StandardInitial()
        Frm_Demande_Fournisseurs.MdiParent = Me
        Frm_Demande_Fournisseurs.Show()
    End Sub

    Private Sub btn_Paiement_fournisseur_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_Paiement_fournisseur.Click
        StandardInitial()
        Frm_Paiement_Fournisseurs.MdiParent = Me
        Frm_Paiement_Fournisseurs.Show()
    End Sub

    Private Sub btn_Equipe_Travail_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_Equipe_Travail.Click
        StandardInitial()
        Frm_Equipe_Travail.MdiParent = Me
        Frm_Equipe_Travail.Show()
    End Sub

    Private Sub btn_Paiement_Personnels_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_Paiement_Personnels.Click
        StandardInitial()
        Frm_Paiement_Personnels.MdiParent = Me
        Frm_Paiement_Personnels.Show()
    End Sub

    Private Sub btn_Equipements_Utilises_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_Equipements_Utilises.Click
        StandardInitial()
        Frm_Equipements_Utilises.MdiParent = Me
        Frm_Equipements_Utilises.Show()
    End Sub

    Private Sub btn_Etat_equipements_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_Etat_equipements.Click
        StandardInitial()
        Frm_Etat_equipements.MdiParent = Me
        Frm_Etat_equipements.Show()
    End Sub

    Private Sub btn_Repertoire_tele_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_Repertoire_tele.Click
        StandardInitial()
        Frm_Repertoire_tele.MdiParent = Me
        Frm_Repertoire_tele.Show()
    End Sub

    Private Sub btn_agenda_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_agenda.Click
        StandardInitial()
        Frm_Agenda.MdiParent = Me
        Frm_Agenda.Show()
    End Sub

    Private Sub btn_Gestion_Client_loc_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
        Frm_list_location.MdiParent = Me
        Frm_list_location.Show()
    End Sub

    Private Sub btn_facture_clients_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_facture_clients.Click
        StandardInitial()
        Frm_Paiement_Clients.MdiParent = Me
        Frm_Paiement_Clients.Show()

    End Sub

    Private Sub btn_Demande_Client_loc_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
        Frm_Demande_Clients_loc.MdiParent = Me
        Frm_Demande_Clients_loc.Show()
    End Sub

    Private Sub ButtonItem3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnItemT1.Click
        StandardInitial()
        Frm_Paraineur.MdiParent = Me
        Frm_Paraineur.Show()
    End Sub

    Private Sub btnItemT1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnItemT2.Click
        StandardInitial()
        frmMesParraines.MdiParent = Me
        frmMesParraines.Show()
    End Sub

    Private Sub btnItemT3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnItemT3.Click
        StandardInitial()
        frmServicesFrn.MdiParent = Me
        frmServicesFrn.Show()
    End Sub

    Private Sub btnItemT5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnItemT5.Click
        StandardInitial()
        frmGestionCheque.MdiParent = Me
        frmGestionCheque.Show()
    End Sub

    Private Sub Frm_Main_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        If File.Exists("ConnectionString.txt") = True Then
            sr = New StreamReader("ConnectionString.txt")
            Do Until sr.Peek = -1
                serveur = sr.ReadLine()
            Loop
            sr.Close()
        Else
            MsgBox("Vous avez oublier de mentionner le nom de serveur!!!" & Environment.NewLine & "L'application va être arréter")
            Application.Exit()
        End If
        Dim cn As New SqlConnectionStringBuilder
        With cn
            .InitialCatalog = "Salle_Mariage"
            .IntegratedSecurity = False
            .Password = "friday14"
            .UserID = "kirat14"
            .DataSource = serveur
        End With
        Con = New SqlConnection(cn.ConnectionString)
    End Sub

    Private Sub btnMenuAdjoint_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnMenuAdjoint.Click
        StandardInitial()
        Frm_Adjoint.MdiParent = Me
        Frm_Adjoint.Show()
    End Sub
End Class
